<% unless logged_in? %>
  <%= form_for @user_session do |f| %>

    <%= render "shared/error_messages", :target => @user_session %>

    <table>
      <tr>
        <th><%= f.label :email %></th>
        <td>
          <%= f.text_field :email, :value => cookies[:user_email] %>
        </td>
      </tr>
      <tr>
        <th><%= f.label :password %></th>
        <td>
          <%= f.password_field :password %>
        </td>
      </tr>
      <tr>
        <th></th>
        <td><label><%= check_box_tag :remember_me %> přihlásit trvale</label></td>
      </tr>
      <tr>
        <td colspan="2"><%= f.submit %></td>
      </tr>
    </table>

    <p>Ještě u nás nemáte účet? <%= link_to "Registrujte se", new_user_path %></p>
    
    <% ['google', 'facebook', 'seznam', 'twitter'].each do |provider| %>
      <%= link_to image_tag("/assets/layout/omniauth/#{provider}_64.png"), "/auth/#{provider}" %>
    <% end %>
  <% end %>
<% else %>
  <p>Již jste přihlášeni. <%= link_to raw("Odhlásit se &raquo;"), logout_path %></p>
<% end %>